<header class="am-header am-header-default am-no-layout">
	<div class="am-header-left am-header-nav">
		<a ng-click="goBack();"><img class="am-header-icon-custom" src="data:image/svg+xml;charset=utf-8,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 12 20&quot;&gt;&lt;path d=&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill=&quot;%23fff&quot;/&gt;&lt;/svg&gt;" alt=""> </a>
	</div>
	<div class="am-header-right am-header-nav">
		<a ng-click="showLogin()" class=""><i class="am-icon-user"> </i></a>
		<a ng-class="{'am-show':showLoading,'am-hide':!showLoading}"><i class="am-icon-spinner am-icon-spin"></i></a>
	</div>
	<h1 class="am-header-title">
		<a>订单确认</a> <a href="javascript: void(0)"></a>
	</h1>
</header>


<!-- 选择之类的 -->
<div class="am-list-news-bd">
	<ul class="am-list am-list-border">
		<li class="am-g"><a data-am-modal="{target: '#doc-modal-1'}"> 配送方式 :<span class="am-fr">{{ deliveryType? deliveryType: "目前只提供自提"}}<i class="am-icon-chevron-right am-fr"></i></span>
		</a></li>
		<li class="am-g"><a data-am-modal="{target: '#doc-modal-2'}"> 配送时间 <span class="am-fr">{{ bufferIntervalName? bufferIntervalName: "请选择收货地址"}}<i class="am-icon-chevron-right am-fr"></i></span>
		</a></li>
		<!-- data-ng-class="{'am-show':deliveryType=='自提','am-hide':deliveryType!='自提'}" -->
		<li class="am-g" ><a data-am-modal="{target: '#doc-modal-4'}"> 店面:<span class="am-fr">{{ storeSelected? storeSelected.name: "请选择店面" }}<i class="am-icon-chevron-right am-fr"></i></span>
		</a></li>
		<li class="am-g"><a data-am-modal="{target: '#doc-modal-3'}"> 支付方式 <span class="am-fr">{{ payType? payType: "请选择付款方式" }}<i class="am-icon-chevron-right am-fr"></i></span>
		</a></li>
	</ul>
</div>

<!-- 商品详情  -->
<div class="am-padding-left-xs">
	<span> 商品清单</span>
	<button class="am-btn am-btn-xs am-fr" data-am-collapse="{target: '#collapse-nav'}">
		Menu <i class="am-icon-bars"></i>
	</button>
</div>
<hr data-am-widget="divider" style="border: thin;" class="am-divider am-divider-one" />
<ul class="am-list am-in" id="collapse-nav">
	<!--缩略图在标题左边-->
	<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" data-ng-repeat="item in products">
		<div class="am-u-sm-6 am-list-thumb">
			<a> <img ng-src="{{ baseUrl+item.product.thumbId }}">
			</a>
		</div>
		<div class="am-u-sm-6 am-list-main">
			<h3 class="am-list-item-hd">
				<span data-ng-bind="item.product.description"></span>
			</h3>
			<h4 class="am-list-item-text">
				<span data-ng-bind="item.product.specification "></span>
			</h4>
			<h3 style="color: green;" class="am-text-lg">
				￥<span data-ng-bind="item.product.price"></span><a class="am-list-item-text">&nbsp;x <span data-ng-bind="item.amount"></span> =
				</a> <span class="am-text-xxl" style="color: red;"><span data-ng-bind="{{ item.product.price * item.amount }}"></span></span>
			</h3>
		</div>
	</li>
</ul>


<!-- 统计  -->
<ul class="am-list am-list-border" id="collapse-nav">
	<!--缩略图在标题左边-->
	<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
		<div class="am-u-sm-12 am-list-main">
			<span class="am-fr" style="color: red;">￥<span data-ng-bind="totalPrice"></span></span> 商品总价
		</div>
	</li>
	<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
		<div class="am-u-sm-12 am-list-main">
			<span class="am-fr" style="color: red;">￥0</span> 运费
		</div>
	</li>
	<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
		<div class="am-u-sm-12 am-list-main">
			<span class="am-fr" ng-init="discount=0">￥{{ discount }}</span> 商品减免
		</div>
	</li>
	<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left">
		<div class="am-u-sm-12 am-list-main">
			<span class="am-fr"></span>
		</div>
	</li>
</ul>

<div class=" am-navbar am-block">
	<ul class="">
		<li class="">
			<div class="am-u-sm-12 am-list-main am-btn am-btn-default" style="background-color: #;">
				<button ng-disabled="showLoading" class="am-round am-btn-xl  am-btn-danger am-fr am-disabled"  ng-click="addOrder()">确认订单</button>
				<span class="am-fl" style="color: orange;">共计：<span data-ng-bind="totalPrice"></span> 元
				</span>
			</div>
		</li>
	</ul>
</div>

<!-- login -->
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">请登录</div>
		<div class="am-modal-bd">
			<form name="formName">
				<div class="am-input-group">
					<span class="am-input-group-label"><i class="am-icon-user"></i></span> <input maxlength="11" type="tel" required data-ng-model="phone" class="am-form-field" placeholder="手机号">
				</div>
				<br>
				<div class="am-input-group">
					<span class="am-input-group-label"><i class="am-icon-lock"></i></span> <input type="password" required data-ng-model="pwd" class="am-form-field" placeholder="密码">
				</div>
			</form>
		</div>
		<div class="am-modal-footer">
			<div class="am-btn-group am-btn-group-justify">
				<button class="am-btn am-btn-success am-radius" role="button" data-ng-click="cancel()">取消</button>
				<button class="am-btn am-btn-primary am-radius" role="button" data-ng-click="login(phone,pwd);" data-ng-disabled="formName.$invalid">确定</button>
			</div>
		</div>
	</div>
</div>

<!-- modals  -->
<!-- sendType  -->
<div class="am-modal am-modal-prompt am-modal-out" tabindex="-1" id="doc-modal-1" style="display: none; margin-top: -84px;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">配送方式</div>
		<div class="am-modal-bd">
			<div class="am-btn-group">
				<label class="am-btn am-btn-primary am-radius"><input type="radio" data-ng-click="cancelDeliveryType()" checked="checked" name="doc-radio" value="自提" data-ng-model="deliveryType">自提</label> <label class="am-btn am-btn-default am-radius disabled"> <input disabled type="radio" name="doc-radio" data-ng-click="cancelDeliveryType()" value="快递" data-ng-model="deliveryType">快递
				</label>
			</div>
		</div>
		<!-- 	<div class="am-modal-footer">
				<span class="am-modal-btn" data-am-modal-cancel data-ng-click="cancel()">取消</span>
				<span class="am-modal-btn" data-am-modal-confirm data-ng-click="">提交</span>
			</div> -->
	</div>
</div>
<!-- GET  -->
<div class="am-modal am-modal-prompt am-modal-out" tabindex="-1" id="doc-modal-2" style="display: none; margin-top: -84px;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">自提时间</div>
		<div class="am-modal-bd">
			<div>
				 <label class="am-btn am-btn-sm am-btn-primary am-radius"><input data-ng-change="cancelbufferIntervalSelect(bufferInterval)" type="radio" name="doc-radio" data-ng-model="bufferInterval" value="0">当天</label>
				 <label class="am-btn am-btn-sm am-btn-primary am-radius"><input data-ng-change="cancelbufferIntervalSelect(bufferInterval);" type="radio" name="doc-radio" data-ng-model="bufferInterval" value="1">第二天</label> 
				 <label class="am-btn am-btn-sm am-btn-primary am-radius"><input data-ng-change="cancelbufferIntervalSelect(bufferInterval);" type="radio" name="doc-radio" data-ng-model="bufferInterval" value="2">第三天</label>
			</div>
		</div>
		<!-- 	<div class="am-modal-footer">
				<span class="am-modal-btn" data-am-modal-cancel="">取消</span> <span
					class="am-modal-btn" data-am-modal-confirm="">提交</span>
			</div> -->
	</div>
</div>
<!-- PAY -->
<div class="am-modal am-modal-prompt am-modal-out" tabindex="-1" id="doc-modal-3" style="display: none; margin-top: -84px;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">支付方式</div>
		<div class="am-modal-bd">
			<div>
				<label class="am-btn am-btn-sm am-btn-primary am-radius"><input data-ng-click="cancelPayType();" type="radio" name="doc-radio" value="支付宝" data-ng-model="payType">支付宝</label> <label class="am-btn am-btn-sm am-btn-primary am-radius"><input data-ng-click="cancelPayType();" type="radio" name="doc-radio" value="微信支付" data-ng-model="payType">微信支付</label>
			</div>
		</div>
	</div>
</div>
<!-- stores -->
<div class="am-modal am-modal-prompt am-modal-out" tabindex="-1" id="doc-modal-4" style="display: none; margin-top: -84px;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">店面</div>
		<div class="am-modal-bd">
			<div>
				<select  required data-ng-change="cancelStoreSelect(storeSelected);" ng-model="storeSelected" name="store" ng-options="store as store.name for store in stores">
					<option value="">--请选择店面--</option>
			</div>
		</div>
	</div>
</div>
